DeferUserFn
DeferUserFn Can code that might cause page faults be called safely?
#include <Memory.h> Memory Manager
Debugger Support Under Virtual Memory
OSErr DeferUserFn(userFunction, argument);
ProcPtr userFunction is the address of a routine
void *argument specifies a pointer to the argument to pass
returns Error Code; 0=no error
You can use the DeferUserFn function to determine whether code that might
cause page faults can safely be called immediately. If the code can be called
safely, then it is called. If a page fault is in progress, however, the routine
address and its parameter are saved, and the routine is deferred until page
faults are again permitted.
userFunction is the address of the routine that you want to run
argument is a pointer to the argument to pass to the specified
routine.
Returns: an operating system Error Code.
noErr (0) No error
cannotDeferErr (-625) Unable to defer additional user functions

Notes: The specified routine is called with register A0 containing the value of the
argument parameter to the DeferUserFn call. Note that the routine can be
called immediately (before returning to the caller of DeferUserFn).
Deferred functions must follow the register conventions used by interrupt
handlers: they may use registers A0-A3 and D0-D3, and must restore all
other registers used.